﻿// This intellisense header interacts w/ the JavaScript extension points for intellisense
// to reduce the amount of completions that aren't available in Node.js

// First attempt to delete all of the extra variables...
delete ActiveXObject
delete AnimationEvent
delete ApplicationCache
delete Attr
delete Audio
delete AudioTrack
delete AudioTrackList
delete BeforeUnloadEvent
delete Blob
delete BookmarkCollection
delete CDATASection
delete CSSFontFaceRule
delete CSSImportRule
delete CSSKeyframeRule
delete CSSKeyframesRule
delete CSSMediaRule
delete CSSNamespaceRule
delete CSSPageRule
delete CSSRule
delete CSSRuleList
delete CSSStyleDeclaration
delete CSSStyleRule
delete CSSStyleSheet
delete CanvasGradient
delete CanvasPattern
delete CanvasPixelArray
delete CanvasRenderingContext2D
delete CharacterData
delete ClientRect
delete ClientRectList
delete CloseEvent
delete CollectGarbage
delete Comment
delete CompositionEvent
delete Console
delete ControlRangeCollection
delete Coordinates
delete CustomEvent
delete DOMError
delete DOMException
delete DOMImplementation
delete DOMParser
delete DOMSettableTokenList
delete DOMStringList
delete DOMTokenList
delete DataTransfer
delete Debug
delete Document
delete DocumentFragment
delete DocumentType
delete DragEvent
delete Element
delete Enumerator
delete ErrorEvent
delete Event
delete EventException
delete File
delete FileList
delete FileReader
delete FocusEvent
delete FormData
delete Geolocation
delete HTMLAnchorElement
delete HTMLAppletElement
delete HTMLAreaElement
delete HTMLAreasCollection
delete HTMLAudioElement
delete HTMLBGSoundElement
delete HTMLBRElement
delete HTMLBaseElement
delete HTMLBaseFontElement
delete HTMLBlockElement
delete HTMLBodyElement
delete HTMLButtonElement
delete HTMLCanvasElement
delete HTMLCollection
delete HTMLDDElement
delete HTMLDListElement
delete HTMLDTElement
delete HTMLDataListElement
delete HTMLDirectoryElement
delete HTMLDivElement
delete HTMLElement
delete HTMLEmbedElement
delete HTMLFieldSetElement
delete HTMLFontElement
delete HTMLFormElement
delete HTMLFrameElement
delete HTMLFrameSetElement
delete HTMLHRElement
delete HTMLHeadElement
delete HTMLHeadingElement
delete HTMLHtmlElement
delete HTMLIFrameElement
delete HTMLImageElement
delete HTMLInputElement
delete HTMLIsIndexElement
delete HTMLLIElement
delete HTMLLabelElement
delete HTMLLegendElement
delete HTMLLinkElement
delete HTMLMapElement
delete HTMLMarqueeElement
delete HTMLMediaElement
delete HTMLMenuElement
delete HTMLMetaElement
delete HTMLModElement
delete HTMLNextIdElement
delete HTMLOListElement
delete HTMLObjectElement
delete HTMLOptGroupElement
delete HTMLOptionElement
delete HTMLParagraphElement
delete HTMLParamElement
delete HTMLPhraseElement
delete HTMLPreElement
delete HTMLProgressElement
delete HTMLQuoteElement
delete HTMLScriptElement
delete HTMLSelectElement
delete HTMLSourceElement
delete HTMLSpanElement
delete HTMLStyleElement
delete HTMLTableCaptionElement
delete HTMLTableCellElement
delete HTMLTableColElement
delete HTMLTableDataCellElement
delete HTMLTableElement
delete HTMLTableHeaderCellElement
delete HTMLTableRowElement
delete HTMLTableSectionElement
delete HTMLTextAreaElement
delete HTMLTitleElement
delete HTMLTrackElement
delete HTMLUListElement
delete HTMLUnknownElement
delete HTMLVideoElement
delete History
delete IDBCursor
delete IDBCursorWithValue
delete IDBDatabase
delete IDBFactory
delete IDBIndex
delete IDBKeyRange
delete IDBObjectStore
delete IDBOpenDBRequest
delete IDBRequest
delete IDBTransaction
delete IDBVersionChangeEvent
delete Image
delete ImageData
delete KeyboardEvent
delete Location
delete MSBehaviorUrnsCollection
delete MSBlobBuilder
delete MSCSSMatrix
delete MSCSSProperties
delete MSCSSRuleList
delete MSCompatibleInfo
delete MSCompatibleInfoCollection
delete MSCurrentStyleCSSProperties
delete MSEventObj
delete MSGesture
delete MSGestureEvent
delete MSManipulationEvent
delete MSMimeTypesCollection
delete MSPluginsCollection
delete MSPointerEvent
delete MSPopupWindow
delete MSRangeCollection
delete MSSelection
delete MSSiteModeEvent
delete MSStream
delete MSStreamReader
delete MSStyleCSSProperties
delete MediaError
delete MediaList
delete MediaQueryList
delete MessageChannel
delete MessageEvent
delete MessagePort
delete MouseEvent
delete MouseWheelEvent
delete MutationEvent
delete NamedNodeMap
delete Navigator
delete Node
delete NodeFilter
delete NodeIterator
delete NodeList
delete Option
delete Performance
delete PerformanceEntry
delete PerformanceMark
delete PerformanceMeasure
delete PerformanceNavigation
delete PerformanceResourceTiming
delete PerformanceTiming
delete PopStateEvent
delete Position
delete PositionError
delete ProcessingInstruction
delete ProgressEvent
delete Range
delete RangeException
delete SVGAElement
delete SVGAngle
delete SVGAnimatedAngle
delete SVGAnimatedBoolean
delete SVGAnimatedEnumeration
delete SVGAnimatedInteger
delete SVGAnimatedLength
delete SVGAnimatedLengthList
delete SVGAnimatedNumber
delete SVGAnimatedNumberList
delete SVGAnimatedPreserveAspectRatio
delete SVGAnimatedRect
delete SVGAnimatedString
delete SVGAnimatedTransformList
delete SVGCircleElement
delete SVGClipPathElement
delete SVGComponentTransferFunctionElement
delete SVGDefsElement
delete SVGDescElement
delete SVGElement
delete SVGElementInstance
delete SVGElementInstanceList
delete SVGEllipseElement
delete SVGException
delete SVGFEBlendElement
delete SVGFEColorMatrixElement
delete SVGFEComponentTransferElement
delete SVGFECompositeElement
delete SVGFEConvolveMatrixElement
delete SVGFEDiffuseLightingElement
delete SVGFEDisplacementMapElement
delete SVGFEDistantLightElement
delete SVGFEFloodElement
delete SVGFEFuncAElement
delete SVGFEFuncBElement
delete SVGFEFuncGElement
delete SVGFEFuncRElement
delete SVGFEGaussianBlurElement
delete SVGFEImageElement
delete SVGFEMergeElement
delete SVGFEMergeNodeElement
delete SVGFEMorphologyElement
delete SVGFEOffsetElement
delete SVGFEPointLightElement
delete SVGFESpecularLightingElement
delete SVGFESpotLightElement
delete SVGFETileElement
delete SVGFETurbulenceElement
delete SVGFilterElement
delete SVGGElement
delete SVGGradientElement
delete SVGImageElement
delete SVGLength
delete SVGLengthList
delete SVGLineElement
delete SVGLinearGradientElement
delete SVGMarkerElement
delete SVGMaskElement
delete SVGMatrix
delete SVGMetadataElement
delete SVGNumber
delete SVGNumberList
delete SVGPathElement
delete SVGPathSeg
delete SVGPathSegArcAbs
delete SVGPathSegArcRel
delete SVGPathSegClosePath
delete SVGPathSegCurvetoCubicAbs
delete SVGPathSegCurvetoCubicRel
delete SVGPathSegCurvetoCubicSmoothAbs
delete SVGPathSegCurvetoCubicSmoothRel
delete SVGPathSegCurvetoQuadraticAbs
delete SVGPathSegCurvetoQuadraticRel
delete SVGPathSegCurvetoQuadraticSmoothAbs
delete SVGPathSegCurvetoQuadraticSmoothRel
delete SVGPathSegLinetoAbs
delete SVGPathSegLinetoHorizontalAbs
delete SVGPathSegLinetoHorizontalRel
delete SVGPathSegLinetoRel
delete SVGPathSegLinetoVerticalAbs
delete SVGPathSegLinetoVerticalRel
delete SVGPathSegList
delete SVGPathSegMovetoAbs
delete SVGPathSegMovetoRel
delete SVGPatternElement
delete SVGPoint
delete SVGPointList
delete SVGPolygonElement
delete SVGPolylineElement
delete SVGPreserveAspectRatio
delete SVGRadialGradientElement
delete SVGRect
delete SVGRectElement
delete SVGSVGElement
delete SVGScriptElement
delete SVGStopElement
delete SVGStringList
delete SVGStyleElement
delete SVGSwitchElement
delete SVGSymbolElement
delete SVGTSpanElement
delete SVGTextContentElement
delete SVGTextElement
delete SVGTextPathElement
delete SVGTextPositioningElement
delete SVGTitleElement
delete SVGTransform
delete SVGTransformList
delete SVGUnitTypes
delete SVGUseElement
delete SVGViewElement
delete SVGZoomAndPan
delete SVGZoomEvent
delete Screen
delete ScriptEngine
delete ScriptEngineBuildVersion
delete ScriptEngineMajorVersion
delete ScriptEngineMinorVersion
delete Selection
delete Storage
delete StorageEvent
delete StyleMedia
delete StyleSheet
delete StyleSheetList
delete StyleSheetPageList
delete Text
delete TextEvent
delete TextMetrics
delete TextRange
delete TextRangeCollection
delete TextTrack
delete TextTrackCue
delete TextTrackCueList
delete TextTrackList
delete TimeRanges
delete TrackEvent
delete TransitionEvent
delete TreeWalker
delete UIEvent
delete URL
delete VBArray
delete ValidityState
delete WebSocket
delete WheelEvent
delete Window
delete Worker
delete XDomainRequest
delete XMLHttpRequest
delete XMLHttpRequestEventTarget
delete XMLSerializer
delete addEventListener
delete alert
delete animationStartTime
delete applicationCache
delete atob
delete attachEvent
delete blur
delete btoa
delete cancelAnimationFrame
delete clientInformation
delete clipboardData
delete close
delete closed
delete confirm
delete createPopup
delete defaultStatus
delete detachEvent
delete dispatchEvent
delete document
delete emitter
delete event
delete execScript
delete external
delete focus
delete frameElement
delete frames
delete getComputedStyle
delete getSelection
delete history
delete indexedDB
delete innerHeight
delete innerWidth
delete item
delete length
delete localStorage
delete location
delete matchMedia
delete maxConnectionsPerServer
delete module_body
delete moveBy
delete moveTo
delete msAnimationStartTime
delete msCancelRequestAnimationFrame
delete msClearImmediate
delete msIndexedDB
delete msIsStaticHTML
delete msMatchMedia
delete msRequestAnimationFrame
delete msSetImmediate
delete msWriteProfilerMark
delete name
delete navigate
delete navigator
delete offscreenBuffering
delete onerror
delete open
delete opener
delete outerHeight
delete outerWidth
delete pageXOffset
delete pageYOffset
delete parent
delete performance
delete postMessage
delete print
delete prompt
delete removeEventListener
delete requestAnimationFrame
delete resizeBy
delete resizeTo
delete screen
delete screenLeft
delete screenTop
delete screenX
delete screenY
delete scroll
delete scrollBy
delete scrollTo
delete self
delete sessionStorage
delete showHelp
delete showModalDialog
delete showModelessDialog
delete status
delete toStaticHTML
delete top
delete window

// Then setup a filter for what we can't delete...
var nodejs_tools_for_visual_studio_hidden_names = {"VBArray":null,  "Enumerator":null,  "document":null,  "window":null,  "Worker":null,  "MSCSSMatrix":null,  "WebSocket"};
var nodejs_tools_for_visual_studio_hidden_properties = {"onmspointerdown":null,  "onmsgesturedoubletap":null,  "onmouseleave":null,  "onmspointerhover":null,  "onmouseenter":null,  "onmspointermove":null,  "onmsgesturehold":null,  "onmsgesturechange":null,  "onmsgesturestart":null,  "onhelp":null,  "onmspointercancel":null,  "onmsgesturetap":null,  "onmsgestureend":null,  "onmspointerout":null,  "onfocusout":null,  "onmsinertiastart":null,  "onfocusin":null,  "onmspointerover":null,  "onmspointerup":null,  "ondragend":null,  "onkeydown":null,  "ondragover":null,  "onkeyup":null,  "onreset":null,  "onmouseup":null,  "ondragstart":null,  "ondrag":null,  "onmouseover":null,  "ondragleave":null,  "onafterprint":null,  "onpause":null,  "onbeforeprint":null,  "onseeked":null,  "onmousedown":null,  "onclick":null,  "onwaiting":null,  "ononline":null,  "ondurationchange":null,  "onblur":null,  "onemptied":null,  "onseeking":null,  "oncanplay":null,  "onstalled":null,  "onmousemove":null,  "onoffline":null,  "onbeforeunload":null,  "onpopstate":null,  "onstorage":null,  "onratechange":null,  "onloadstart":null,  "ondragenter":null,  "onsubmit":null,  "onprogress":null,  "ondblclick":null,  "oncontextmenu":null,  "onchange":null,  "onloadedmetadata":null,  "onplay":null,  "onplaying":null,  "oncanplaythrough":null,  "onabort":null,  "onreadystatechange":null,  "onkeypress":null,  "onloadeddata":null,  "onsuspend":null,  "onfocus":null,  "onmessage":null,  "ontimeupdate":null,  "onresize":null,  "onselect":null,  "ondrop":null,  "onmouseout":null,  "onended":null,  "onunload":null,  "onhashchange":null,  "onscroll":null,  "onmousewheel":null,  "onvolumechange":null,  "onload":null,  "oninput"};
var nodejs_tools_for_visual_studio_hidden_objects = [VBArray, Enumerator, document];

intellisense.addEventListener('statementcompletion', function (event) {
    if (event.scope == 'global') {
        event.items = event.items.filter(function (item) {
            if (item.name.indexOf("nodejs_tools_for_visual_studio_hidden_") == 0) {
                // hide our internal variables from intellisense
                return false;
            }
            if (item.kind == "property" && item.name in nodejs_tools_for_visual_studio_hidden_properties) {
                // hide all of the known properties
                return false;
            }
            if (item.kind == "field" || item.kind == "property") {
                if (typeof item.value == 'undefined' && item.name in nodejs_tools_for_visual_studio_hidden_names) {
                    // hide various fields and properties that we can't delete
                    // We check item.value to be undefined because for user defined values
                    // we'll have a value.
                    return false;
                }
            }
            if (item.kind == "method" || item.kind == "field") {
                if (nodejs_tools_for_visual_studio_hidden_objects.indexOf(item.value) != -1) {
                    // hide VBArray & Enumerator which we can't delete and still have values.
                    return false;
                }
            }
            return true;
        });
    }
});

